package jp.co.sn.mml.pojo.tmyzsetindex;

import jp.co.sn.mml.pojo.tmitem.Tmitem;

public class TmyzsetindexId implements java.io.Serializable { 

	//項目コード
	private Tmitem itemCd;
	//適用日
	private Long startYmd;
	//検査小分類
	private String SBnr;

	/** default constructor */
	public TmyzsetindexId(){

	}

	/** full constructor */
	public TmyzsetindexId(Tmitem itemCd,Long startYmd,String SBnr){
		this.itemCd = itemCd;
		this.startYmd = startYmd;
		this.SBnr = SBnr;
	}

	//Property accessors
	public Tmitem getItemCd(){
		return this.itemCd;
	}

	public void setItemCd(Tmitem itemCd){
		this.itemCd=itemCd;
	}

	public Long getStartYmd(){
		return this.startYmd;
	}

	public void setStartYmd(Long startYmd){
		this.startYmd=startYmd;
	}

	public String getSBnr(){
		return this.SBnr;
	}

	public void setSBnr(String SBnr){
		this.SBnr=SBnr;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmyzsetindexId))
			return false;

		TmyzsetindexId castOther = (TmyzsetindexId) other;

		return ((this.getItemCd() ==  castOther.getItemCd())
				||(this.getItemCd()!=null && castOther.getItemCd() !=null 
					&& castOther.getItemCd() !=null 
					&& this.getItemCd().equals(castOther.getItemCd())))
			&& ((this.getStartYmd() ==  castOther.getStartYmd())
				||(this.getStartYmd()!=null && castOther.getStartYmd() !=null 
					&& castOther.getStartYmd() !=null 
					&& this.getStartYmd().equals(castOther.getStartYmd())))
			&& ((this.getSBnr() ==  castOther.getSBnr())
				||(this.getSBnr()!=null && castOther.getSBnr() !=null 
					&& castOther.getSBnr() !=null 
					&& this.getSBnr().equals(castOther.getSBnr())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getItemCd() == null ? 0 : this.getItemCd().hashCode());
		result = 37 * result
				+ (getStartYmd() == null ? 0 : this.getStartYmd().hashCode());
		result = 37 * result
				+ (getSBnr() == null ? 0 : this.getSBnr().hashCode());
		return result;
	}

}